<?php
class Workflow_Node_Cancel extends Workflow_Node
{
	/**
     * Constraint: The minimum number of outgoing nodes this node has to have
     * to be valid. Set to false to disable this constraint.
     *
     * @var integer
     */
    protected $minOutNodes = 0;

    /**
     * Constraint: The maximum number of outgoing nodes this node has to have
     * to be valid. Set to false to disable this constraint.
     *
     * @var integer
     */
    protected $maxOutNodes = 1;

    /**
     * Cancels the execution of this workflow.
     *
     * @param Workflow_Execution $execution
     * @param Workflow_Node      $activatedFrom
     * @param int                  $threadId
     * @ignore
     */
    public function activate( Workflow_Execution $execution, Workflow_Node $activatedFrom = null, $threadId = 0 )
    {
        $execution->cancel( $this );
    }
}
?>